<template>
    <el-drawer v-model="isDrawerVisible" title="收藏详情" :with-header="true">
        <el-descriptions direction="vertical" :column="3" size="large" border>
            <el-descriptions-item label="收藏id">{{shoucang.scid}}</el-descriptions-item>
            <el-descriptions-item label="用户id">{{shoucang.yhid}}</el-descriptions-item>
            <el-descriptions-item label="收藏id">{{shoucang.sjid}}</el-descriptions-item>
        </el-descriptions>
    </el-drawer>
</template>

<script setup lang="ts">
import {ref} from 'vue';

// 控制抽屉的显示
const isDrawerVisible = ref(false);

const shoucang = ref({
    scid: '',
    yhid: '',
    sjid:''
})

// 接收父组件传递过来的 对象 数据
const handleDetailData = (obj) => {
    isDrawerVisible.value = true;
    shoucang.value = obj;
}

// 将 handleDetailData 暴露给父组件
defineExpose({
    handleDetailData
})
</script>

<style scoped>
</style>